package com.bnyy.medicalHousekeeper.request.service;

import com.bnyy.medicalHousekeeper.bean.BloodPressDetail;
import com.bnyy.medicalHousekeeper.bean.CheckUpdateInfo;
import com.bnyy.medicalHousekeeper.bean.CustomerDetail;
import com.bnyy.medicalHousekeeper.bean.HealthDataDetail;
import com.bnyy.medicalHousekeeper.bean.IncomeDetail;
import com.bnyy.medicalHousekeeper.bean.MedicalHousekeeper;
import com.bnyy.medicalHousekeeper.bean.MineInfo;
import com.bnyy.medicalHousekeeper.bean.Order;
import com.bnyy.medicalHousekeeper.bean.ServiceGoods;
import com.bnyy.medicalHousekeeper.bean.ShareData;
import com.bnyy.medicalHousekeeper.bean.Shop;
import com.bnyy.medicalHousekeeper.bean.ShopDetail;
import com.bnyy.medicalHousekeeper.bean.Customer;
import com.bnyy.medicalHousekeeper.bean.NormalGoodsDetail;
import com.bnyy.medicalHousekeeper.bean.IndexData;
import com.bnyy.medicalHousekeeper.bean.IndexStats;
import com.bnyy.medicalHousekeeper.bean.ServiceGoodsDetail;
import com.bnyy.medicalHousekeeper.bean.ShopInfo;
import com.bnyy.medicalHousekeeper.bean.Subordinate;
import com.bnyy.medicalHousekeeper.bean.SubordinateDetail;
import com.bnyy.medicalHousekeeper.bean.User;
import com.bnyy.common.ResponseData;
import com.bnyy.medicalHousekeeper.bean.Article;
import com.bnyy.medicalHousekeeper.bean.ArticleDetail;
import com.bnyy.medicalHousekeeper.bean.Goods;
import com.bnyy.wallet.bean.BankCardInfo;

import java.util.ArrayList;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Url;
import rx.Observable;

public interface JavaRetrofitService {

    @POST("app/version")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<CheckUpdateInfo>> checkUpdate(@Body RequestBody requestBody);

    // 获取用户信息
    @GET("app/flush")
    Observable<ResponseData<User>> flushLogin();

    //获取验证码
    @POST("app/sms_code")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<Object>> getCode(@Body RequestBody requestBody);

    //验证码登录
    @POST("app/login")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<User>> login(@Body RequestBody requestBody);

    //退出登录
    @GET("app/logout")
    Observable<ResponseData<Object>> logout();

//    //获取全局变量
//    @POST("comms/get_global_params")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<GlobalParams>> getGlobalParams(@Body RequestBody requestBody);
//
//    //套餐详情
//    @POST("app/meal")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<PackageDetail>> getPackageDetail(@Query("type") int type);
//
//    // 检查按字母排序地区是否更新
//    @GET("area/get_area")
//    Observable<ResponseData<AreaSortByFirstLetter>> checkAreaSortByFirstLetters(@Query("uuid") String uuid);
//
//    // 获取按字母排序地区
//    @GET("area/get_area")
//    Observable<ResponseData<AreaSortByFirstLetter>> getAreaSortByFirstLetters();
//
//    //修改个人信息
//    @POST("familyusers/updateByPrimaryKeySelective")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> editUserInfo(@Body RequestBody requestBody);
//
//    //健康数据日历
//    @POST("app/health/calendar")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Calendar>> getHealthCalendar(@Body RequestBody requestBody);
//
//    //家属共享新版
//    @POST("app/wear/family_unite/list?v=2")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ArrayList<DeviceInfo>>> getFamilyShare2();
//
//    //家属共享删除
//    @POST("app/wear/family_unite/del")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> deleteFamilyShare(@Body RequestBody requestBody);
//
//    // 获取睡眠日数据
//    @POST("app/health/sleep")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<SleepDay>> getSleepDayData(@Body RequestBody requestBody);
//
//    // 获取刷新提示
//    @POST("app/phrase/one")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<String>> getRefreshTips();
//
//    @POST("app/version")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<CheckUpdateInfo>> checkUpdate(@Body RequestBody requestBody);
//
//    /**
//     * 收货地址列表
//     * @return
//     */
//    @POST("comms/address?v=1")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ArrayList<ReceivingAddress>>> getReceivingAddresses(@Body RequestBody requestBody);
//
//    /**
//     * 收货地址列表
//     * @return
//     */
//    @POST("comms/address?v=1")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ArrayList<ReceivingAddress>>> getReceivingAddresses();
//
//    /**
//     * 新增收货地址
//     * @param requestBody
//     * @return
//     */
//    @POST("comms/address/add?v=1")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Map<String, String>>> addReceivingAddress(@Body RequestBody requestBody);
//    /**
//     * 编辑收货地址
//     * @param requestBody
//     * @return
//     */
//    @POST("comms/address/update?v=1")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Map<String, String>>> editReceivingAddress(@Body RequestBody requestBody);
//    /**
//     * 删除收货地址
//     * @param requestBody
//     * @return
//     */
//    @POST("comms/address/del?v=1")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> deleteReceivingAddress(@Body RequestBody requestBody);
//
//    /**
//     * 删除推送别名
//     * @param requestBody
//     * @return
//     */
//    @POST("jpush/remove_rid")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> deleteAlias(@Body RequestBody requestBody);
//
//    /**
//     * 获取首页广告信息
//     * @return
//     */
//    @POST("app/health/home/advertise")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ArrayList<HomePageAd>>> getHomePageAd();
//
//    /**
//     * 账号注销
//     * @return
//     */
//    @POST("app/account/del")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> accountCancel();
//
//    /**
//     * 获取消息
//     * @return
//     */
//    @POST("message/list")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ArrayList<Notice>>> getNotices(@Body RequestBody requestBody);
//
//    /**
//     * 获取消息
//     * @return
//     */
//    @POST("message/read")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> readNotice(@Body RequestBody requestBody);
//
//    //删除消息
//    @POST("message/remove_message")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> deleteNotice(@Body RequestBody requestBody);
//
//    // 获取分享信息
//    @POST("comms/share")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<ShareData>> share(@Body RequestBody requestBody);
//
//    // 解析分享信息
//    @POST("comms/share/scan")
//    @Headers({"Content-Type: application/json","Accept: application/json"})
//    Observable<ResponseData<Object>> decodeShareData(@Body RequestBody requestBody);

    // 首页统计
    @POST("housekeeper/statistics")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<IndexStats>> getIndexStats(@Body RequestBody requestBody);

    // 首页数据
    @POST("housekeeper/homePage")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<IndexData>> getIndexData(@Body RequestBody requestBody);

    // 关联商品列表
    @POST("housekeeper/relationGoods")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Goods>>> getRelationGoodsList(@Body RequestBody requestBody);

    // 未联商品列表
    @POST("housekeeper/noRelationGoods")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Goods>>> getNoRelationGoodsList(@Body RequestBody requestBody);

    // 添加商品
    @POST("housekeeper/addRelationGoods")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<Object>> addGoods(@Body RequestBody requestBody);

    // 添加商品
    @POST("housekeeper/delRelationGoods")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<Object>> removeGoods(@Body RequestBody requestBody);

    // 新品列表
    @POST("housekeeper/newGoods")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Goods>>> getNewProducts(@Body RequestBody requestBody);

    // 文章详情
    @POST("housekeeper/goodsArticleInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArticleDetail>> getArticleDetail(@Body RequestBody requestBody);

    // 普通商品详情
    @POST("app/shop/goodsDesc")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<NormalGoodsDetail>> getNormalGoodsDetail(@Body RequestBody requestBody);

    /**
     * 服务商品详情
     */
    @POST("app/service/goods/one")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ServiceGoodsDetail>> getServiceGoodsDetail(@Body RequestBody requestBody);

    // 文章列表
    @POST()
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Article>>> getArticleList(@Url String url, @Body RequestBody requestBody);

    // 商家列表
    @POST("housekeeper/relationProviderList")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Shop>>> getShopList(@Body RequestBody requestBody);

    // 下级医养管家列表
    @POST("housekeeper/lowerLevelList")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Subordinate>>> getSubordinateList(@Body RequestBody requestBody);

    // 客户列表
    @POST("housekeeper/relationUserList")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Customer>>> getCustomerList(@Body RequestBody requestBody);

    // 下级医养管家详情
    @POST("housekeeper/lowerLevelListInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<SubordinateDetail>> getSubordinateDetail(@Body RequestBody requestBody);

    // 商家详情
    @POST("housekeeper/relationProviderInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<ShopDetail>>> getShopDetail(@Body RequestBody requestBody);

    // 店铺信息
    @POST("app/service/shop/one")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ShopInfo>> getShop(@Body RequestBody requestBody);

    // 店铺服务商品列表
    @POST("app/service/goods/list")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<ServiceGoods>>> getShopServiceGoodsList(@Body RequestBody requestBody);

    // 客户详情
    @POST("housekeeper/relationUserInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<CustomerDetail>> getCustomerDetail(@Body RequestBody requestBody);

    // 订单列表
    @POST("housekeeper/relationUserOrders")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<ArrayList<Order>>> getOrderList(@Body RequestBody requestBody);

    // 我的
    @POST("housekeeper/mine")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<MineInfo>> getMineInfo(@Body RequestBody requestBody);

    // 收益详情
    @POST("housekeeper/profitInfo")
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    Observable<ResponseData<IncomeDetail>> getIncomeDetail(@Body RequestBody requestBody);

    /**
     * 提现
     * @return
     */
    @POST("housekeeper/mine/withdraw")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> withDrawal(@Body RequestBody requestBody);

    // 添加银行卡
    @POST("housekeeper/mine/addBank")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> addBankCard(@Body RequestBody requestBody);

    // 获取银行卡列表
    @POST("housekeeper/mine/bank")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<BankCardInfo>>> getBankCardList();

    // 健康数据
    @POST("app/health/data")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<HealthDataDetail>> getHealthData(@Body RequestBody requestBody);

    /**
     * 获取血压详情
     */
    @POST("app/health/data")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<BloodPressDetail>> getBloodPressDetail(@Body RequestBody requestBody);

    // 医养管家主页
    @POST("app/housekeeper/home")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<MedicalHousekeeper>> getHousekeeperHomePage(@Body RequestBody requestBody);

    // 商品列表
    @POST("app/housekeeper/goods")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<Goods>>> getMedicalHousekeeperGoodsList(@Body RequestBody requestBody);

    // 获取分享信息
    @POST("comms/share")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ShareData>> share(@Body RequestBody requestBody);

    // 获取分享信息
    @POST("housekeeper/saveShareRecord")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Article>> saveShareRecord(@Body RequestBody requestBody);

    // 解析分享信息
    @POST("comms/share/scan")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> decodeShareData(@Body RequestBody requestBody);

    // 分享记录
    @POST("housekeeper/shareRecord")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<Article>>> getArticles(@Body RequestBody requestBody);

    // 商品列表
    @POST("housekeeper/goodsList")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<Goods>>> getGoods(@Body RequestBody requestBody);

    // 保存个人简介
    @POST("housekeeper/saveIntroduce")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> editIntroduction(@Body RequestBody requestBody);
}



























